function http({ url, data, method }) {   //封装http函数
    return new Promise((resolve, reject) => {
        wx.request({
            url,
            data,
            method,
            success: (res) => {
                resolve(res);
            },
            fail: (err) => {
                reject(err)
            }
        })
    })
}
export { http };